<div class="panel panel-default" ng-switch on="panel.type" ng-if="savedObj || error">
  <div class="panel-heading">
    <span class="panel-title" title="{{::savedObj.title}}">
      {{::savedObj.title}}
    </span>
    <div class="btn-group">
      <a aria-label="Edit" ng-show="!isFullScreenMode && editUrl" ng-href="{{::editUrl}}">
        <i aria-hidden="true" class="fa fa-pencil"></i>
      </a>
      <a aria-label="Move" ng-show="!isFullScreenMode" class="panel-move">
        <i aria-hidden="true" class="fa fa-arrows"></i>
      </a>
      <a aria-label="Remove" ng-show="!isFullScreenMode" ng-click="remove()">
        <i aria-hidden="true" class="fa fa-times"></i>
      </a>
    </div>
    <div class="clearfix"></div>
  </div>

  <div ng-if="error" class="load-error">
    <i aria-hidden="true" class="fa fa-exclamation-triangle"></i>
    <span ng-bind="error"></span>
  </div>

  <visualize
    ng-switch-when="visualization"
    vis="savedObj.vis"
    search-source="savedObj.searchSource"
    show-spy-panel="!isFullScreenMode"
    ui-state="uiState"
    render-counter
    class="panel-content">
  </visualize>

  <doc-table
    ng-switch-when="search"
    search-source="savedObj.searchSource"
    sorting="panel.sort"
    columns="panel.columns"
    render-counter
    class="panel-content"
    filter="filter">
  </doc-table>
</div>
